package com.gss.stockLedger.util;

import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;

import javax.annotation.PostConstruct;

import org.springframework.stereotype.Component;

@Component
public class ApplicationConstants {
	
	public static final String RNIPL = "RNIPL";
	public static final String NMIPL = "NMIPL";
	public static HashMap<String, String> PURCHASE_TYPE = new HashMap<String, String>();
	public static HashMap<String, String> TRANSACTION_TYPE = new HashMap<String, String>();
	public static HashMap<String, String> ACCOUNT_TYPE = new HashMap<String, String>();
	
	public static String pathToExcel = System.getProperty("stockReportsPath") + System.getProperty("file.separator") + "reports";
	public static String TT_TYPE_OPENING = "OPENING";
	public static String TT_TYPE_GRIR = "ZGRIR";
	public static String TT_TYPE_CUSTOM = "CUSTOM";
	public static String TT_TYPE_COSTPRICE = "COSTPRICE";
	public static String TT_TYPE_FOREX = "FOREX";
	public static String TT_TYPE_INVADJ = "INVADJ";
	public static String TT_TYPE_RETRO = "RETRO";
	public static String TT_TYPE_FOC = "FOC";
	public static String TT_TYPE_CONS = "CONS";
	public static String TT_TYPE_SALES = "SALES";
	public static String TT_TYPE_RTV = "RTV";
	public static String TT_TYPE_CAPTIVE = "CAPTIVE";
	public static String TT_TYPE_SCRAP = "SCRAP";
	public static String TT_TYPE_FIADJ = "FIADJ";
	public static String TT_TYPE_OTHERCONS = "OCONS";
	
	public static String TT_INV_PARTS = "Parts";
	public static String TT_INV_DM = "DM";
	public static String TT_INV_CKDIMPORTED = "CKD-Imported";
	public static String TT_INV_CKDLOCAL = "CKD-Local";
	public static String TT_INV_AS = "AS";
	public static String TT_INV_STEELMFG = "Steel-Manufacturing";
	public static String TT_INV_STEELTRD = "Steel-Trading";
	public static String TT_INV_PCC = "PCC";
	public static String TT_INV_MCHSPARES = "Machine-Spares";
	public static String TT_INV_SPARES = "Spares";
	public static String TT_INV_SPAREPARTS = "Spare-Parts";
	
	public static String transactionTypeVendorReport = "ZGRIR";
	
	public static String vendorWiseSheetName = "VendorWiseReport";
	public static String negativePartSheetName = "NegativePartAnalysis";
	
	public static boolean checkIfNullOrBlank(String strToCheck){
		if(null == strToCheck || "".equals(strToCheck.trim()))
			return true;
		else
			return false;
	}
	
	@PostConstruct
	public void initialize(){
		PURCHASE_TYPE.put("IMPORT","Import");
		PURCHASE_TYPE.put("LOCAL","Local");
		
		TRANSACTION_TYPE.put("GRIR", "GRIR");
		TRANSACTION_TYPE.put("CustomClearing", "Custom Clearing");
		TRANSACTION_TYPE.put("CostPriceDiff", "Cost Price Difference");
		TRANSACTION_TYPE.put("RetroEntries", "Retro Entry");
		TRANSACTION_TYPE.put("FIEntries", "FI Entry");
		
		ACCOUNT_TYPE.put("Purchase","Purchase");
		ACCOUNT_TYPE.put("FIAdjustment","FI Adjustment");
		ACCOUNT_TYPE.put("Rejection","Rejection");
		ACCOUNT_TYPE.put("Scrap","Scrap");
		ACCOUNT_TYPE.put("Sale","Sale");
		
		System.out.println("Constants Initialized !!!!!");
		
	}

}
